package source;

import org.newdawn.slick.Animation;
import org.newdawn.slick.Image;
import org.newdawn.slick.SpriteSheet;
import org.newdawn.slick.geom.Polygon;

public class HitableObject {

	public int x = 0;
	public int y = 0;
	public float width = 0;
	public float height = 0;
	
	
	public int depth = 0;
	public Image image = null;
	public Animation ani = null;
	public SpriteSheet sheet = null;
	public Polygon hitPolygon;
	public Type type;

	public HitableObject(float[] points) {
		this.hitPolygon = new Polygon(points);
		
		this.width = this.hitPolygon.getWidth();
		this.height = this.hitPolygon.getHeight();
		
	}
	
	public void move(int X, int Y)
	{
		x += X;
		y += Y;
		this.hitPolygon.setX(x);		
		this.hitPolygon.setY(y+DataManager.getInstance().offsetY);		
	}
}
